<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: High-Level</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__scb__uart__high__level__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">High-Level<div class="ingroups"><a class="el" href="group__group__scb.html">SCB          (Serial Communication Block)</a> &raquo; <a class="el" href="group__group__scb__uart.html">UART (SCB)</a> &raquo; <a class="el" href="group__group__scb__uart__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf31baac4127fbab570f27bde1df9c622"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gaf31baac4127fbab570f27bde1df9c622">Cy_SCB_UART_StartRingBuffer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, void *buffer, uint32_t size, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:gaf31baac4127fbab570f27bde1df9c622"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the receive ring buffer operation.  <a href="#gaf31baac4127fbab570f27bde1df9c622">More...</a><br /></td></tr>
<tr class="separator:gaf31baac4127fbab570f27bde1df9c622"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab759a9b7c7d5406699833c049fdaa72c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gab759a9b7c7d5406699833c049fdaa72c">Cy_SCB_UART_StopRingBuffer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:gab759a9b7c7d5406699833c049fdaa72c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops receiving data into the ring buffer and clears the ring buffer.  <a href="#gab759a9b7c7d5406699833c049fdaa72c">More...</a><br /></td></tr>
<tr class="separator:gab759a9b7c7d5406699833c049fdaa72c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa497f01cc0fdc16bc050869160138954"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gaa497f01cc0fdc16bc050869160138954">Cy_SCB_UART_GetNumInRingBuffer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *context)</td></tr>
<tr class="memdesc:gaa497f01cc0fdc16bc050869160138954"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data elements in the ring buffer.  <a href="#gaa497f01cc0fdc16bc050869160138954">More...</a><br /></td></tr>
<tr class="separator:gaa497f01cc0fdc16bc050869160138954"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4fe298d9d23ced2826998a44dde923c1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga4fe298d9d23ced2826998a44dde923c1">Cy_SCB_UART_ClearRingBuffer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:ga4fe298d9d23ced2826998a44dde923c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the ring buffer.  <a href="#ga4fe298d9d23ced2826998a44dde923c1">More...</a><br /></td></tr>
<tr class="separator:ga4fe298d9d23ced2826998a44dde923c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace7421c664f582ab4ad4bade0683f209"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gace7421c664f582ab4ad4bade0683f209">Cy_SCB_UART_Receive</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, void *buffer, uint32_t size, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:gace7421c664f582ab4ad4bade0683f209"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function starts a UART receive operation.  <a href="#gace7421c664f582ab4ad4bade0683f209">More...</a><br /></td></tr>
<tr class="separator:gace7421c664f582ab4ad4bade0683f209"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf55cfa886e03cf485b6491d2f8ecfb30"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gaf55cfa886e03cf485b6491d2f8ecfb30">Cy_SCB_UART_AbortReceive</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:gaf55cfa886e03cf485b6491d2f8ecfb30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort the current receive operation by clearing the receive status.  <a href="#gaf55cfa886e03cf485b6491d2f8ecfb30">More...</a><br /></td></tr>
<tr class="separator:gaf55cfa886e03cf485b6491d2f8ecfb30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4cc7bd2f28ef5e170e663414dba66f8c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga4cc7bd2f28ef5e170e663414dba66f8c">Cy_SCB_UART_GetReceiveStatus</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *context)</td></tr>
<tr class="memdesc:ga4cc7bd2f28ef5e170e663414dba66f8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the receive operation.  <a href="#ga4cc7bd2f28ef5e170e663414dba66f8c">More...</a><br /></td></tr>
<tr class="separator:ga4cc7bd2f28ef5e170e663414dba66f8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f3adeb3117ac83fb4ab75a5be72a44f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga0f3adeb3117ac83fb4ab75a5be72a44f">Cy_SCB_UART_GetNumReceived</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *context)</td></tr>
<tr class="memdesc:ga0f3adeb3117ac83fb4ab75a5be72a44f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data elements received since the last call to <a class="el" href="group__group__scb__uart__high__level__functions.html#gace7421c664f582ab4ad4bade0683f209">Cy_SCB_UART_Receive</a>.  <a href="#ga0f3adeb3117ac83fb4ab75a5be72a44f">More...</a><br /></td></tr>
<tr class="separator:ga0f3adeb3117ac83fb4ab75a5be72a44f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga12cc7712f9cb5e26b28d1d9a3a9576b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga12cc7712f9cb5e26b28d1d9a3a9576b4">Cy_SCB_UART_Transmit</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, void *buffer, uint32_t size, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:ga12cc7712f9cb5e26b28d1d9a3a9576b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function starts a UART transmit operation.  <a href="#ga12cc7712f9cb5e26b28d1d9a3a9576b4">More...</a><br /></td></tr>
<tr class="separator:ga12cc7712f9cb5e26b28d1d9a3a9576b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e860593a2acc245b432ebd59e5780b7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga2e860593a2acc245b432ebd59e5780b7">Cy_SCB_UART_AbortTransmit</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *context)</td></tr>
<tr class="memdesc:ga2e860593a2acc245b432ebd59e5780b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts the current transmit operation.  <a href="#ga2e860593a2acc245b432ebd59e5780b7">More...</a><br /></td></tr>
<tr class="separator:ga2e860593a2acc245b432ebd59e5780b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92ea29d41db81f995b0ff442d6639191"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#ga92ea29d41db81f995b0ff442d6639191">Cy_SCB_UART_GetTransmitStatus</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *context)</td></tr>
<tr class="memdesc:ga92ea29d41db81f995b0ff442d6639191"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the transmit operation.  <a href="#ga92ea29d41db81f995b0ff442d6639191">More...</a><br /></td></tr>
<tr class="separator:ga92ea29d41db81f995b0ff442d6639191"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa718862ebaad835b183ed04d7bc65f2d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__uart__high__level__functions.html#gaa718862ebaad835b183ed04d7bc65f2d">Cy_SCB_UART_GetNumLeftToTransmit</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *context)</td></tr>
<tr class="memdesc:gaa718862ebaad835b183ed04d7bc65f2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data elements left to transmit since the last call to <a class="el" href="group__group__scb__uart__high__level__functions.html#ga12cc7712f9cb5e26b28d1d9a3a9576b4">Cy_SCB_UART_Transmit</a>.  <a href="#gaa718862ebaad835b183ed04d7bc65f2d">More...</a><br /></td></tr>
<tr class="separator:gaa718862ebaad835b183ed04d7bc65f2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf31baac4127fbab570f27bde1df9c622"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf31baac4127fbab570f27bde1df9c622">&#9670;&nbsp;</a></span>Cy_SCB_UART_StartRingBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_UART_StartRingBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the receive ring buffer operation. </p>
<p>The RX interrupt source is configured to get data from the RX FIFO and put into the ring buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">buffer</td><td>Pointer to the user defined ring buffer. The element size is defined by the data type, which depends on the configured data width.</td></tr>
    <tr><td class="paramname">size</td><td>The size of the receive ring buffer. Note that one data element is used for internal use, so if the size is 32, then only 31 data elements are used for data storage.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The buffer must not be modified and stay allocated while the ring buffer operates.</li>
<li>This function overrides the RX interrupt sources and changes the RX FIFO level. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gab759a9b7c7d5406699833c049fdaa72c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab759a9b7c7d5406699833c049fdaa72c">&#9670;&nbsp;</a></span>Cy_SCB_UART_StopRingBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_UART_StopRingBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops receiving data into the ring buffer and clears the ring buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa497f01cc0fdc16bc050869160138954"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa497f01cc0fdc16bc050869160138954">&#9670;&nbsp;</a></span>Cy_SCB_UART_GetNumInRingBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_UART_GetNumInRingBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of data elements in the ring buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data elements in the receive ring buffer.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>One data element is used for internal use, so when the buffer is full, this function returns (Ring Buffer size - 1). </dd></dl>

</div>
</div>
<a id="ga4fe298d9d23ced2826998a44dde923c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4fe298d9d23ced2826998a44dde923c1">&#9670;&nbsp;</a></span>Cy_SCB_UART_ClearRingBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_UART_ClearRingBuffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the ring buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gace7421c664f582ab4ad4bade0683f209"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gace7421c664f582ab4ad4bade0683f209">&#9670;&nbsp;</a></span>Cy_SCB_UART_Receive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a> Cy_SCB_UART_Receive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function starts a UART receive operation. </p>
<p>It configures the receive interrupt sources to get data available in the receive FIFO and returns. The <a class="el" href="group__group__scb__uart__interrupt__functions.html#ga3e1928d8f20b2685aad02df29b658e3f">Cy_SCB_UART_Interrupt</a> manages the further data transfer.</p>
<p>If the ring buffer is enabled, this function first reads data from the ring buffer. If there is more data to receive, it configures the receive interrupt sources to copy the remaining bytes from the RX FIFO when they arrive.</p>
<p>When the receive operation is completed (requested number of data elements received) the <a class="el" href="group__group__scb__uart__macros__receive__status.html#ga5ddb60f6cf8432fb0e2bc15b1a353902">CY_SCB_UART_RECEIVE_ACTIVE</a> status is cleared and the <a class="el" href="group__group__scb__uart__macros__callback__events.html#ga027091599ffb1698dc4c9e2877e17103">CY_SCB_UART_RECEIVE_DONE_EVENT</a> event is generated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">buffer</td><td>Pointer to buffer to store received data. The element size is defined by the data type, which depends on the configured data width.</td></tr>
    <tr><td class="paramname">size</td><td>The number of data elements to receive.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The buffer must not be modified and stay allocated until end of the receive operation.</li>
<li>This function overrides the RX interrupt sources and changes the RX FIFO level. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gaf55cfa886e03cf485b6491d2f8ecfb30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf55cfa886e03cf485b6491d2f8ecfb30">&#9670;&nbsp;</a></span>Cy_SCB_UART_AbortReceive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_UART_AbortReceive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort the current receive operation by clearing the receive status. </p>
<ul>
<li>If the ring buffer is disabled, the receive interrupt sources are disabled.</li>
<li>If the ring buffer is enabled, the receive interrupt source is configured to get data from the receive FIFO and put it into the ring buffer.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The RX FIFO and ring buffer are not cleared after abort of receive operation.</li>
<li>If after the abort of the receive operation the transmitter continues sending data, it gets into the RX FIFO. To drop this data, the RX FIFO and ring buffer (if enabled) must be cleared when the transmitter stops sending data. Otherwise, received data will be kept and copied to the buffer when <a class="el" href="group__group__scb__uart__high__level__functions.html#gace7421c664f582ab4ad4bade0683f209">Cy_SCB_UART_Receive</a> is called. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga4cc7bd2f28ef5e170e663414dba66f8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4cc7bd2f28ef5e170e663414dba66f8c">&#9670;&nbsp;</a></span>Cy_SCB_UART_GetReceiveStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_UART_GetReceiveStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the status of the receive operation. </p>
<p>This status is a bit mask and the value returned may have multiple bits set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__uart__macros__receive__status.html">UART Receive Statuses</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The status is only cleared by calling <a class="el" href="group__group__scb__uart__high__level__functions.html#gace7421c664f582ab4ad4bade0683f209">Cy_SCB_UART_Receive</a> again. </dd></dl>

</div>
</div>
<a id="ga0f3adeb3117ac83fb4ab75a5be72a44f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f3adeb3117ac83fb4ab75a5be72a44f">&#9670;&nbsp;</a></span>Cy_SCB_UART_GetNumReceived()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_UART_GetNumReceived </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of data elements received since the last call to <a class="el" href="group__group__scb__uart__high__level__functions.html#gace7421c664f582ab4ad4bade0683f209">Cy_SCB_UART_Receive</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data elements received. </dd></dl>

</div>
</div>
<a id="ga12cc7712f9cb5e26b28d1d9a3a9576b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga12cc7712f9cb5e26b28d1d9a3a9576b4">&#9670;&nbsp;</a></span>Cy_SCB_UART_Transmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a> Cy_SCB_UART_Transmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function starts a UART transmit operation. </p>
<p>It configures the transmit interrupt sources and returns. The <a class="el" href="group__group__scb__uart__interrupt__functions.html#ga3e1928d8f20b2685aad02df29b658e3f">Cy_SCB_UART_Interrupt</a> manages the further data transfer.</p>
<p>When the transmit operation is completed (requested number of data elements sent on the bus), the <a class="el" href="group__group__scb__uart__macros__transmit__status.html#gaa640df2a6637fd851cfcce6665ba93f1">CY_SCB_UART_TRANSMIT_ACTIVE</a> status is cleared and the <a class="el" href="group__group__scb__uart__macros__callback__events.html#gaf7e87969a0f31bbcd1bcc84d8266c7b9">CY_SCB_UART_TRANSMIT_DONE_EVENT</a> event is generated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">buffer</td><td>Pointer to user data to place in transmit buffer. The element size is defined by the data type, which depends on the configured data width.</td></tr>
    <tr><td class="paramname">size</td><td>The number of data elements to transmit.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__uart__enums.html#gac72413306ca26b7b8174526e3fc539df">cy_en_scb_uart_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The buffer must not be modified and must stay allocated until its content is copied into the TX FIFO.</li>
<li>This function overrides the TX FIFO interrupt sources and changes the TX FIFO level. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga2e860593a2acc245b432ebd59e5780b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e860593a2acc245b432ebd59e5780b7">&#9670;&nbsp;</a></span>Cy_SCB_UART_AbortTransmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_UART_AbortTransmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Aborts the current transmit operation. </p>
<p>It disables the transmit interrupt sources and clears the transmit FIFO and status.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Side Effects</dt><dd>The transmit FIFO clear operation also clears the shift register, so that the shifter can be cleared in the middle of a data element transfer, corrupting it. The data element corruption means that all bits that have not been transmitted are transmitted as "ones" on the bus. </dd></dl>

</div>
</div>
<a id="ga92ea29d41db81f995b0ff442d6639191"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92ea29d41db81f995b0ff442d6639191">&#9670;&nbsp;</a></span>Cy_SCB_UART_GetTransmitStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_UART_GetTransmitStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the status of the transmit operation. </p>
<p>This status is a bit mask and the value returned may have multiple bits set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__uart__macros__transmit__status.html">UART Transmit Status</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The status is only cleared by calling <a class="el" href="group__group__scb__uart__high__level__functions.html#ga12cc7712f9cb5e26b28d1d9a3a9576b4">Cy_SCB_UART_Transmit</a> or <a class="el" href="group__group__scb__uart__high__level__functions.html#ga2e860593a2acc245b432ebd59e5780b7">Cy_SCB_UART_AbortTransmit</a>. </dd></dl>

</div>
</div>
<a id="gaa718862ebaad835b183ed04d7bc65f2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa718862ebaad835b183ed04d7bc65f2d">&#9670;&nbsp;</a></span>Cy_SCB_UART_GetNumLeftToTransmit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_UART_GetNumLeftToTransmit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of data elements left to transmit since the last call to <a class="el" href="group__group__scb__uart__high__level__functions.html#ga12cc7712f9cb5e26b28d1d9a3a9576b4">Cy_SCB_UART_Transmit</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the UART SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__uart__context__t.html">cy_stc_scb_uart_context_t</a> allocated by the user. The structure is used during the UART operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data elements left to transmit. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
